package com.itheima.factory;

import com.itheima.service.UserService;

public class InstanceFactory {

    //非静态方法: 创建一个对象并返回
    public Object getBean(){
        UserService userService = new UserService() {


            public void save() {
                System.out.println("UserService的匿名实现类对象 save...2222");
            }
        };
        return userService;
    }
}
